/**
 * @description  home的api
 * @author 印明帝
 */
import { axios, _formateAxiosData } from './axiosInstance'

/***
  * 获取首页的第一页数据
  * @method getHomeInfo
  * @returns {Promise}
  */
async function getHomeInfo () {
  let result = await axios.get('/home')
  return _formateAxiosData(result)
}
/***
  * 获取首页的更多博客
  * @method getHomeInfo
  * @returns {Promise}
  */
async function loadHomeMoreBlog (index) {
  let result = await axios.get('/home/loadMore', {
    params: {
      index
    }
  })
  return _formateAxiosData(result)
}

/**
 * 获取at人的列表
 * @method getAtList
 */
async function getAtList () {
  let result = await axios.get('/home/atList')
  return _formateAxiosData(result)
}
export {
  getHomeInfo,
  loadHomeMoreBlog,
  getAtList
}
